App = function(config){
	Ext.apply(this, config);
	this.addEvents('ready');
	App.superclass.constructor.call(this, config);
	Ext.onReady(this.init, this);
};

Ext.extend(App, Ext.util.Observable, {
	isReady: false
	//,modules: {}
	,init: function(){
		Ext.QuickTips.init();
		
		// init modules
		/*var module;
		for(var i in this.modules){
			module = this.modules[i];
			module.app = this;
			module.id = i;
			module.init();
			if(module.launcher){
				var btConf = module.launcher;
				btConf.cls = 'start-menu';
				btConf.iconCls = i + '-16x16';
				App.StartMenu.module.menu.add(btConf);
			}
		}*/
		this.fireEvent('ready', this);
		this.isReady = true;
	}
	,onReady : function(fn, scope){
        if(!this.isReady){
            this.on('ready', fn, scope);
        }else{
            fn.call(scope, this);
        }
    }
});


Ext.apply(App, {
	StartMenu: null
	,StartButton: null
	,Taskbar: null
	,ExitButton: null
	,ToolbarPanel: null
	,Desktop: null
	,Viewport: null	
});